/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.techshop.service.impl;

import com.techshop.dao.NewsDao;
import com.techshop.model.News;
import com.techshop.service.NewsService;
import java.util.List;

/**
 *
 * @author hai
 */
public class NewsServiceImpl implements NewsService{
     private NewsDao newsDao;

    public NewsDao getNewsDao() {
        return newsDao;
    }

    public void setNewsDao(NewsDao newsDao) {
        this.newsDao = newsDao;
    }
    @Override
    public News getById(int NewsId) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public List<News> findAll() {
        return this.getNewsDao().findAll();
    }

    @Override
    public boolean insert(News news) {
        return this.getNewsDao().insert(news);
    }

    @Override
    public boolean update(News news) {
        return this.getNewsDao().update(news);
    }

    @Override
    public boolean delete(News news) {
        return this.getNewsDao().delete(news);
    }
    
}
